home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
COMM
/
PPL4P10A
/
HEX_IO.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-02-20
|
827b
|
34 lines
(*********************************************)
(* *)
(* This program is donated to the Public *)
(* Domain by MarshallSoft Computing, Inc. *)
(* It is provided as an example of the use *)
(* of the Personal Communications Library. *)
(* *)
(*********************************************)
unit hex_io;
interface
Procedure WriteHexByte(Data:Byte);
Procedure WriteHexWord(Data:Word);
implementation
uses crt;
Procedure WriteHexByte(Data:Byte);
const HexChars: array[0..15] of char = '0123456789abcdef';
begin
write( HexChars[Data SHR 4] );
write( HexChars[Data AND $0F] );
end;
Procedure WriteHexWord(Data:Word);
begin
WriteHexByte(Data SHR 8);
WriteHexByte(Data AND $00FF)
end;
end.